<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos  -->
			<title>Docs For Class Zend_Http_Client_Adapter_Test</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
						<script src="../../media/lib/classTree.js"></script>
												<script language="javascript" type="text/javascript">
				var imgPlus = new Image();
				var imgMinus = new Image();
				imgPlus.src = "../../media/images/plus.png";
				imgMinus.src = "../../media/images/minus.png";
				
				function showNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgMinus.src;
					oTable.style.display = "block";
				}
				
				function hideNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgPlus.src;
					oTable.style.display = "none";
				}
				
				function nodeIsVisible(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
									break;
							}
					return (oTable && oTable.style.display == "block");
				}
				
				function toggleNodeVisibility(Node){
					if (nodeIsVisible(Node)){
						hideNode(Node);
					}else{
						showNode(Node);
					}
				}
			</script>
					</head>
		<body>
			<div class="page-body">			
<h2 class="class-name"><img src="../../media/images/Class_logo.png"
														alt=" Class"
														title=" Class"
														style="vertical-align: middle"> Zend_Http_Client_Adapter_Test</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
                <p class="implements">
            Implements interfaces:
            <ul>
                <li><a href="../../Zend_Http/Client_Adapter/Zend_Http_Client_Adapter_Interface.html">Zend_Http_Client_Adapter_Interface</a></li>            </ul>
        </p>
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">A testing-purposes adapter.</p>
<p class="description"><p>Should be used to test all components that rely on Zend_Http_Client,  without actually performing an HTTP request. You should instantiate this  object manually, and then set it as the client's adapter. Then, you can  set the expected response using the setResponse() method.</p></p>
	<ul class="tags">
				<li><span class="field">copyright:</span> Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)</li>
				<li><span class="field">license:</span> <a href="http://framework.zend.com/license/new-bsd">New BSD License</a></li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_Http---Client---Adapter---Test.php.html">/Http/Client/Adapter/Test.php</a> (line <span class="field">50</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																								<div class="var-title">
					<img src="../../media/images/Variable.png" alt=" " />
					<span class="var-type">array</span>
					<a href="#$config" title="details" class="var-name">$config</a>
				</div>
																<div class="var-title">
					<img src="../../media/images/Variable.png" alt=" " />
					<span class="var-type">integer</span>
					<a href="#$responseIndex" title="details" class="var-name">$responseIndex</a>
				</div>
																<div class="var-title">
					<img src="../../media/images/Variable.png" alt=" " />
					<span class="var-type">array</span>
					<a href="#$responses" title="details" class="var-name">$responses</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																							
				<div class="method-definition">
					<img src="../../media/images/Constructor.png" alt=" "/>
											<span class="method-result">Zend_Http_Client_Adapter_Test</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#addResponse" title="details" class="method-name">addResponse</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$response</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#close" title="details" class="method-name">close</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#connect" title="details" class="method-name">connect</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$host</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$port</span> = <span class="var-default">80</span>], [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$secure</span> = <span class="var-default">false</span>], <span class="var-type">int</span>&nbsp;<span class="var-name">$timeout</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">string</span>
										<a href="#read" title="details" class="method-name">read</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#setConfig" title="details" class="method-name">setConfig</a>
											([<span class="var-type">Zend_Config</span>&nbsp;<span class="var-name">$config</span> = <span class="var-default">array()</span>])
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#setResponse" title="details" class="method-name">setResponse</a>
											(<span class="var-type"><a href="../../Zend_Http/Response/Zend_Http_Response.html">Zend_Http_Response</a>|array|string</span>&nbsp;<span class="var-name">$response</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#setResponseIndex" title="details" class="method-name">setResponseIndex</a>
											(<span class="var-type">integer</span>&nbsp;<span class="var-name">$index</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">string</span>
										<a href="#write" title="details" class="method-name">write</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$method</span>, <span class="var-type"><a href="../../Zend_Uri/Zend_Uri_Http.html">Zend_Uri_Http</a></span>&nbsp;<span class="var-name">$uri</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$http_ver</span> = <span class="var-default">'1.1'</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$headers</span> = <span class="var-default">array()</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$body</span> = <span class="var-default">''</span>])
									</div>
											</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			
<a name="var$config" id="$config"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<img src="../../media/images/Variable.png" />
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$config</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">57</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Parameters array</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$responseIndex" id="$responseIndex"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<img src="../../media/images/Variable.png" />
		<span class="var-title">
			<span class="var-type">integer</span>
			<span class="var-name">$responseIndex</span>
			 = <span class="var-default"> 0</span>			(line <span class="line-number">72</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Current position in the response buffer</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$responses" id="$responses"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<img src="../../media/images/Variable.png" />
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$responses</span>
			 = <span class="var-default">array(&quot;HTTP/1.1 400 Bad Request\r\n\r\n&quot;)</span>			(line <span class="line-number">65</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Buffer of responses to be returned by the read() method.  Can be  set using setResponse() and addResponse().</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Constructor.png" />
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">78</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Adapter constructor, currently empty. Config is set using setConfig()</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Zend_Http_Client_Adapter_Test</span>
		<span class="method-name">
			__construct
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodaddResponse" id="addResponse"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">addResponse</span> (line <span class="line-number">187</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Add another response to the response buffer.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			addResponse
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$response</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$response</span><span class="var-description">: Zend_Http_Response|$response</span>			</li>
				</ul>
		
			
	</div>
<a name="methodclose" id="close"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">close</span> (line <span class="line-number">164</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Close the connection (dummy)</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			close
		</span>
				()
			</div>
	
		
				<hr class="separator" />
		<div class="notes">Implementation of:</div>
			<dl>
			<dt><a href="../../Zend_Http/Client_Adapter/Zend_Http_Client_Adapter_Interface.html#methodclose">Zend_Http_Client_Adapter_Interface::close()</a></dt>
						<dd>Close the connection to the server</dd>
					</dl>
			
	</div>
<a name="methodconnect" id="connect"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">connect</span> (line <span class="line-number">112</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Connect to the remote server</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			connect
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$host</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$port</span> = <span class="var-default">80</span>], [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$secure</span> = <span class="var-default">false</span>], <span class="var-type">int</span>&nbsp;<span class="var-name">$timeout</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$host</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$port</span>			</li>
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$secure</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$timeout</span>			</li>
				</ul>
		
				<hr class="separator" />
		<div class="notes">Implementation of:</div>
			<dl>
			<dt><a href="../../Zend_Http/Client_Adapter/Zend_Http_Client_Adapter_Interface.html#methodconnect">Zend_Http_Client_Adapter_Interface::connect()</a></dt>
						<dd>Connect to the remote server</dd>
					</dl>
			
	</div>
<a name="methodread" id="read"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">read</span> (line <span class="line-number">152</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return the response set in $this-&gt;setResponse()</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			read
		</span>
				()
			</div>
	
		
				<hr class="separator" />
		<div class="notes">Implementation of:</div>
			<dl>
			<dt><a href="../../Zend_Http/Client_Adapter/Zend_Http_Client_Adapter_Interface.html#methodread">Zend_Http_Client_Adapter_Interface::read()</a></dt>
						<dd>Read response from server</dd>
					</dl>
			
	</div>
<a name="methodsetConfig" id="setConfig"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">setConfig</span> (line <span class="line-number">86</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the configuration array for the adapter</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setConfig
		</span>
					([<span class="var-type">Zend_Config</span>&nbsp;<span class="var-name">$config</span> = <span class="var-default">array()</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">Zend_Config</span>
				<span class="var-name">$config</span><span class="var-description">: | array $config</span>			</li>
				</ul>
		
				<hr class="separator" />
		<div class="notes">Implementation of:</div>
			<dl>
			<dt><a href="../../Zend_Http/Client_Adapter/Zend_Http_Client_Adapter_Interface.html#methodsetConfig">Zend_Http_Client_Adapter_Interface::setConfig()</a></dt>
						<dd>Set the configuration array for the adapter</dd>
					</dl>
			
	</div>
<a name="methodsetResponse" id="setResponse"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">setResponse</span> (line <span class="line-number">172</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the HTTP response(s) to be returned by this adapter</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setResponse
		</span>
					(<span class="var-type"><a href="../../Zend_Http/Response/Zend_Http_Response.html">Zend_Http_Response</a>|array|string</span>&nbsp;<span class="var-name">$response</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../../Zend_Http/Response/Zend_Http_Response.html">Zend_Http_Response</a>|array|string</span>
				<span class="var-name">$response</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetResponseIndex" id="setResponseIndex"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">setResponseIndex</span> (line <span class="line-number">202</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets the position of the response buffer.  Selects which  response will be returned on the next call to read().</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setResponseIndex
		</span>
					(<span class="var-type">integer</span>&nbsp;<span class="var-name">$index</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$index</span>			</li>
				</ul>
		
			
	</div>
<a name="methodwrite" id="write"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">write</span> (line <span class="line-number">125</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Send request to the remote server</p>
	<ul class="tags">
				<li><span class="field">return:</span> Request as string</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			write
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$method</span>, <span class="var-type"><a href="../../Zend_Uri/Zend_Uri_Http.html">Zend_Uri_Http</a></span>&nbsp;<span class="var-name">$uri</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$http_ver</span> = <span class="var-default">'1.1'</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$headers</span> = <span class="var-default">array()</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$body</span> = <span class="var-default">''</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$method</span>			</li>
					<li>
				<span class="var-type"><a href="../../Zend_Uri/Zend_Uri_Http.html">Zend_Uri_Http</a></span>
				<span class="var-name">$uri</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$http_ver</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$headers</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$body</span>			</li>
				</ul>
		
				<hr class="separator" />
		<div class="notes">Implementation of:</div>
			<dl>
			<dt><a href="../../Zend_Http/Client_Adapter/Zend_Http_Client_Adapter_Interface.html#methodwrite">Zend_Http_Client_Adapter_Interface::write()</a></dt>
						<dd>Send request to the remote server</dd>
					</dl>
			
	</div>
						
		</div>
	</div>

	
	<p class="notes" id="credit">
		Documentation generated on Mon, 26 Oct 2009 10:11:19 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
	</p>
	</div></body>
</html>